package com.newlink.building.userinfo.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.DefaultData
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.UserQrCodeData
import com.newlink.building.userinfo.mvp.contract.Module_UserInfo_FamilyManagementDetailWaitActivationQRCodeContract
import io.reactivex.Observable

/**
 * @author wangyang
 * @date 2022/10/12
 * @description 我的——家庭管理——等待激活状态的详情页（二维码）页面的Model
 */
class Module_UserInfo_FamilyManagementDetailWaitActivationQRCodeModel : BaseModel(),
    Module_UserInfo_FamilyManagementDetailWaitActivationQRCodeContract.Model {

    override fun deleteFamilyManagement(
        token: String,
        userId: String
    ): Observable<HttpResult<DefaultData>> {
        return Base_RetrofitHelper.service.deleteFamilyManagement(token, userId)
    }

    override fun getUserQrCode(
        token: String,
        userId: String,
    ): Observable<HttpResult<UserQrCodeData>> {
        return Base_RetrofitHelper.service.getUserQrCode(token, userId.toLong())
    }
}